﻿using System;
using UnityEngine;

namespace Valve.VR.InteractionSystem
{
	// Token: 0x02000602 RID: 1538
	public class DestroyOnTriggerEnter : MonoBehaviour
	{
		// Token: 0x0600271F RID: 10015 RVA: 0x000E4680 File Offset: 0x000E2880
		private void Start()
		{
			if (!string.IsNullOrEmpty(this.tagFilter))
			{
				this.useTag = true;
			}
		}

		// Token: 0x06002720 RID: 10016 RVA: 0x000E469C File Offset: 0x000E289C
		private void OnTriggerEnter(Collider collider)
		{
			if (!this.useTag || (this.useTag && collider.gameObject.tag == this.tagFilter))
			{
				UnityEngine.Object.Destroy(collider.gameObject.transform.root.gameObject);
			}
		}

		// Token: 0x04002721 RID: 10017
		public string tagFilter;

		// Token: 0x04002722 RID: 10018
		private bool useTag;
	}
}
